/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 23735
 * Date: 2022-10-03
 * Time: 22:25
 */
public class Main {
    public static void main(String[] args) {
        Sort sort=new Sort();
        //希尔排序
//        int []array={3,1,4,2,9,5,6,8,6,7,0,-1,-9,100,-2,1000,-999};
//        sort.shellSort(array);
//        sort.display(array);

        //堆排序
//        int []array={3,1,4,2,9,5,6,8,6,7,0,-1,-9,100,-2,1000,-999};
//        sort.heapSort(array);
//        sort.display(array);


        //快速排序
//        int []array={10000,3,1,4,2,9,5,6,8,6,7,0,-1,-9,100,-2,1000,-999};
//        sort.quickSort(array);
//        sort.display(array);

        //插入排序
//        int []array={10000,3,1,4,2,9,5,6,8,6,7,0,-1,-9,100,-2,1000,-999};
//        sort.insertSort(array);
//        sort.display(array);

        //归并排序
//        int []array={10000,3,1,4,2,9,5,6,8,6,7,0,-1,-9,100,-2,1000,-999};
//        sort.mergeSort(array);
//        sort.display(array);


        //快排非递归
//        int []array={10000,3,1,4,2,9,5,6,8,6,7,0,-1,-9,100,-2,1000,-999};
//        sort.quickSortNonR(array);
//        sort.display(array);

        //归并非递归
        int []array={10000,3,1,4,2,9,5,6,8,6,7,0,-1,-9,100,-2,1000,-999};
        sort.mergerSortNonR(array);
        sort.display(array);
    }
}
